
#ifndef   __INPUTS_HANDLERS_H_
#define   __INPUTS_HANDLERS_H_

/* #define   EVENTS_MAX				20 */
/* #define   HANDLERS_AMOUNT		EVENTS_MAX */

#define   LIST_INPUTS_DESCRIPTORS		EX_ADDR_INPUTS_DESCRIPTORS

#define   INPUTS_DESCRIPTOR_MESSAGE_SIZE		31

#define   INPUTS_DESCRIPTOR_MESSAGES_COUNT	3

#define   RISE		1
#define   FALL		0

#define	INPUTS_DESCRIPTOR_COUNT		15	   

/* typedef struct  */
/* { */
/* 		unsigned Group_1	:	4; */
/* 		unsigned Group_2	:	4; */
/* 		unsigned Group_3	:	4; */
/* 		unsigned Group_4	:	4; */
/* }USER_GROUP_NUMBERS; */

typedef struct
{
		unsigned char InputName;  		/* Input number */
		unsigned char EventsOnEdge;/* 'RISE'(1), 'FALL'(0), 'PULSE'(EventsOnEdge > 1), 'ANY CHANGE'(EventsOnEdge==0xFF)*/
		unsigned char Reserve;
		unsigned char Message[INPUTS_DESCRIPTOR_MESSAGES_COUNT][INPUTS_DESCRIPTOR_MESSAGE_SIZE+1];
}INPUTS_DESCRIPTOR;				  /* Input event descriptor */




void SysEvent_Add( unsigned char Event );
void EventsManager( void );

void InputsManager( void );


#endif






/* typedef struct */
/* { */
/* 		FUNCTION* Call; */
/* 		FUNCTION* Caller; */


/* }HANDLER_ENTRY; */


//void InputsHandlers_Init( void );
/* Handlers for each Input */
//extern FUNCTION *HandlersList[HANDLERS_AMOUNT];
//extern HANDLER_ENTRY HandlersList[HANDLERS_AMOUNT];
//extern unsigned char CurrentEvent;
